<template>
	<div v-for='(item,index) in arrList' :key='index'>
		<p>元素的值：{{item}}-----------其对应索引为：{{index}}</p>
	</div>
	<div v-for='(item,index) in arrList' :key='index'>
		<p>元素的值：{{item.flowername}}-----------其对应索引为：{{index}}</p>
	</div>
</template>

<script setup>
	import {reactive} from 'vue';
	//演示数组渲染列表
	const arrList=reactive(['荷花','牵牛花','梅花','月桂'])
	const objLIst=reactive([
		{id:1,flowername:'荷花'},
		{id:2,flowername:'牵牛花'},
		{id:3,flowername:'梅花'},
		{id:4,flowername:'月桂'}
	])
</script>

<style>
</style>